<?php 

class Reality{
	
	private $name;
	private $area;
	private $price;
	private $hash;
	
	public function __construct($name, $area, $price){
		$this->name = $name;
		$this->area = $area;
		$this->price = $price;
	}
	
	public function getName() {
		return $this->name;
	}

	public function  setName($name) {
		$this->name = $name;
	}

	public function getArea() {
		return $this->area;
	}

	public function  setArea($area) {
		$this->area = $area;
	}

	public function getPrice() {
		return $this->price;
	}

	public function setPrice($price) {
		$this->price = $price;
	}
	
	public function getHash() {
		
		$string = $this->getName() . $this->getArea() . $this->getPrice();
		
		return md5($string);
	}

	
}

?>